<template>
  <div class="supplierProfile">
    <a-card class="general-card" title="供应商查询">
      <searchBar v-model:config="searchConfig" @tap-date="tapDate" />
      <formButtonGroup v-model:columns="columns" v-model:size="size" :config="config" @refresh="init" />
      <a-table
        :loading="loading"
        :pagination="pagination"
        :columns="columns"
        :data="data"
        :bordered="false"
        :size="size"
        @page-change="handlePageChange"
        @page-size-change="handlePageSizeChange"
      >
        <template #option>
          <a-button type="primary" size="small" @click="opArticleNumber"> 匹配号码设置 </a-button>
        </template>
      </a-table>
    </a-card>
  </div>
</template>

<script lang="ts">
import { toRefs } from 'vue';
import importConfig from './defaultFile';
import searchBar from '@com/searchBar/searchBar.vue';
import formButtonGroup from '@com/formButtonGroup/formButtonGroup.vue';
export default {
  components: {
    searchBar,
    formButtonGroup,
  },
  setup() {
    const { base, data, opArticleNumber, init, tapDate } = importConfig();
    init();
    return {
      ...toRefs(base),
      opArticleNumber,
      data,
      init,
      tapDate,
    };
  },
};
</script>

<style scoped lang="less"></style>
